<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>会员注册 - 花礼网</title>
    <meta name="description" content="花礼网-中国鲜花网领先品牌,Hua.com专注鲜花速递服务10年,销量稳居鲜花礼品类网站首位！鲜花网提供24小时订鲜花，同城送花、异地送花服务,网上订花后最快3小时即可将鲜花快递上门,送花网站覆盖中国900多城市！" />
    <meta name="keywords" content="中国鲜花礼品网,鲜花,鲜花网,鲜花快递,网上订花送花,中国鲜花网,鲜花礼品,网上订花,送花网站" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit|ie-comp">
    <!--<script type="text/javascript" src="/home/CheckAgent"></script>-->
    <link rel="icon" href="/favicon.ico" mce_href="/favicon.ico" type="image/x-icon">
    <link type="text/css" rel="stylesheet" href="../css/layer.css">
    <link type="text/css" rel="stylesheet" href="../css/common.css">
    <link type="text/css" rel="stylesheet" href="../css/public_2020.css">
    <link type="text/css" rel="stylesheet" href="../css/pc_login_20191023.css">
    <!--公共js-->
    <script src="../../../Common/js/jquery-3.5.1.min.js"></script>
    <script src="../../../Common/layui/layui.js"></script>
    <script src="../../../Common/js/jquery.form.js"></script>
    <script src="../../../Common/js/common.js"></script>
    <!--js-->
    <script src="../js/common.js"></script>
    <!--购物车待完善-->
    <script src="../js/statesandright.js"></script>
    <script src="../js/mailautocomplete.js"></script>
    <script src="../js/verifyMethodSwitch.js"></script>
    <script src="../js/pc_Login_CommonV2.js"></script>
    <!-- 注册js -->
    <script src="../js/register.js"></script>

    <!--[if lte IE 9]>
    <style>
        .pwd-input{
            display:none;
        }
    </style>
    <![endif]-->
    <style>
        body {
            color: #737373;
        }
    </style>

    <!--[if lt IE 9]>
    <![endif]-->
</head>
<body class="home">

<!-- 顶部导航 -->
<div class="site-nav">
    <div class="container">
        <ul class="site-nav-l">
            <li class="menu">
                <a href="/" onClick="addfavorite();return false;"><span class="ico ico-star"></span>收藏鲜花网(hua.com)</a>
            </li>
            <li class="menu dropdown">
                <a href="javascript:void(0)" data-hover="dropdown" data-delay="0"><span class="ico ico-weixin"></span>关注微信</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="//img02.hua.com/pc/pimg/home/wxguanjia_qrcode.png" height="124" width="124">
                    <p>扫码关注<br>回复"礼物" 更多惊喜！</p>
                </div>
            </li>
            <li class="menu dropdown">
                <a href="/mobile/" data-hover="dropdown" data-delay="0" target="_blank"><span class="ico ico-mobile"></span>花礼网app</a>
                <div class="dropdown-menu dropdown-weixin">
                    <img src="//img02.hua.com/pc/pimg/home/app_download_qrcode.png" height="124" width="124">
                    <p>新人专享100元APP礼包</p>
                </div>
            </li>
        </ul>
        <ul class="site-nav-r">
            <!--登陆状态信息显示start-->
            <li class="menu login" id="LoginInfo">
                <a href="/Passport/Login/" rel="nofollow" id="btn-login">你好，请登录</a><a href="/Passport/Register/" rel="nofollow" id="btn-reg">注册</a>
            </li>
            <!--登陆状态信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu">
                <a href="/help/ordercx/" rel="nofollow" target="_blank">订单查询</a>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--我的花礼信息显示start-->
            <li class="menu dropdown">
                <a href="/member/" rel="nofollow" data-hover="dropdown" data-delay="0" target="_blank">我的花礼</a>
            </li><!--我的花礼信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu dropdown">
                <a href="/help/" data-hover="dropdown" data-delay="0" target="_blank">客户服务<span class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-service">
                    <a href="/member/payment/balancefill" target="_blank">在线付款</a>
                    <a href="/help/" target="_blank">帮助中心</a>
                    <a href="/help/afterservice.htm" target="_blank">售后服务</a>
                    <a href="/help/sendRange.htm" target="_blank">配送范围</a>
                    <a href="/chat/" target="_blank">留言反馈</a>
                </div>
            </li>
            <li class="site-nav-pipe">|</li>
            <!--购物车信息显示start-->
            <li class="menu dropdown">
                <a href="/shopping/showcart/" data-hover="dropdown" data-delay="0" rel="nofollow" target="_blank"><span class="ico ico-cart"></span>购物车<span class="text-primary" id="gwcCount"></span><span class="glyphicon glyphicon-triangle-bottom"></span></a>
                <div class="dropdown-menu dropdown-cart" id="CartInfo"></div>
            </li><!--购物车信息显示end-->
            <li class="site-nav-pipe">|</li>
            <li class="menu slogan">
                中国鲜花礼品网:中国鲜花网领先品牌
            </li>
        </ul>
    </div>
</div>
<!-- 顶部导航 End -->
<!-- 头部 -->
<header>
    <div class="logo">
        <h1><a href="/" class="logo-bd">中国鲜花礼品网(花礼网)</a></h1>
        <!--
<div class="delivery-city">
<div class="dropdown csqh">
    欢迎注册
</div>
</div>
-->
    </div>
    <div class="search">
        <form name="i_search" method="get" action="/search/">
            <div class="input-group">
                <input name="keyword" type="text" class="form-control" placeholder="商品关键词">
                <span class="input-group-btn">
                            <button id="test" class="btn btn-primary" type="button" onClick="this.form.submit()">搜索</button>
                        </span>
            </div>
        </form>

    </div>
    <div class="service serviceDefault">
        <span class="ico ico-phone"></span>400-889-8188
        <a id="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a>
    </div>
    <div class="service serviceVip">
        <div class="vipwechatchat">
            <img style="margin-right: 6px;" src="//img02.hua.com/pc/images/wechat.png" width="30" /><span>1对1钻石客户经理</span>
            <div class="vipwechatchat-box">
                <h3>微信1对1客服经理</h3>
                <img class="img-responsive" style="width: 120px;display: inline-block;" src="https://img02.hua.com/m/member/VIPChatQR.jpg" />
                <p>扫一扫添加客户经理微信</p>
                <p>微信号：VIP-Service-Hua</p>
            </div>
        </div>
        <a id="header-chat" href="javascript:void(0);"><span class="ico ico-headset"></span>在线客服</a><br />
        <span class="ico ico-phone"></span><span>钻石专线：400-830-3920</span>
    </div>
</header>
<!-- 头部 End -->

<section class="login-wrapper">
    <div class="container">
        <div class="login-box">
            <ul class="login-tabs">
                <li class="register-byphone active">手机账号注册</li>
             <!--   <li class="register-bymail">邮箱账号注册</li>-->
            </ul>
            <div id="form1">
                <!-- 手机注册 -->
                <div id="register-phone" class="login-form register-form register-form-tel">
                    <div class="tel-box">
                        <div class="input-box">
                            <span class="icon icon-iphone"></span>
                            <input id="phone" name="phone" class="account" type="text" placeholder="请输入手机" autocomplete="off">
                        </div>
                        <p class="tips"></p>
                    </div>
                    <div id="phoneVerifyBox" class="verify-box verify-box1">
                        <div class="input-box">
                            <input id="phonePicCode" name="phonePicCode" class="verify" type="text" autocomplete="off" placeholder="请输入验证码">
                            <a href="javascript:void(0)" onclick="javascript:RefreshImage2('imgCaptcha1','phone')"><img id="imgCaptcha1" src="../js/index"></a>
                        </div>
                        <p class="tips"></p>
                    </div>
                    <div class="code-box">
                        <div class="input-box">
                            <span class="icon icon-message"></span>
                            <input id="phoneCode" name="phoneCode" class="pwd" type="text" autocomplete="off" placeholder="请输入短信验证码">
                            <span id="getcode" class="get-code">获取验证码</span>
                            <div id="prompt_info" style="display:none;"><span id="regetcode">90</span>秒后重新发送</div>
                        </div>
                        <p class="tips"></p>
                    </div>
                    <div class="pwd-box pwd-box1">
                        <div class="input-box">
                            <span class="icon icon-unlocked"></span>
                            <!--[if lte IE 9]>
                            <div class="cover-pwd" data-placeholder="请输入密码">请输入密码</div>
                            <input id="phonePassWord" name="phonePassWord" class="pwd" type="password" autocomplete="off">
                            <![endif]-->
                            <input id="phonePassWord" name="phonePassWord" class="pwd pwd-input" type="text" placeholder="请输入密码" onfocus="this.type='password'" autocomplete="off">
                        </div>
                        <p class="tips"></p>
                    </div>
                    <input class="form-btn login-btn reg" type="button" value="注册">
                </div>
                <!-- 邮箱注册 -->
                <div id="register-mail" class="login-form register-form register-form-mail">
                    <div class="mail-box">
                        <div class="input-box">
                            <span class="icon icon-email"></span>
                            <input id="email" name="email" class="account" type="text" placeholder="请输入邮箱" autocomplete="off">
                        </div>
                        <p class="tips"></p>
                    </div>
                    <div id="emailVerifyBox" class="verify-box verify-box2">
                        <div class="input-box">
                            <input id="emailValidCode" name="emailValidCode" class="verify" type="text" autocomplete="off" placeholder="请输入验证码">
                            <a href="javascript:void(0)" onclick="javascript:RefreshImage2('imgCaptcha2','email','email');"><img id="imgCaptcha2" src="../js/index"></a>
                        </div>
                        <p class="tips"></p>
                    </div>
                    <div class="pwd-box pwd-box2">
                        <div class="input-box">
                            <span class="icon icon-unlocked"></span>
                            <!--[if lte IE 9]>
                            <div class="cover-pwd" data-placeholder="请输入密码">请输入密码</div>
                            <input id="emailPassWord" name="emailPassWord" class="pwd" type="password" autocomplete="off">
                            <![endif]-->
                            <input id="emailPassWord" name="emailPassWord" class="pwd pwd-input" type="text" placeholder="请输入密码" onfocus="this.type='password'" autocomplete="off">
                        </div>
                        <p class="tips"></p>
                    </div>
                    <input class="form-btn login-btn reg" type="button" value="注册" style="margin-top:16px;">
                </div>
                <div class="bottom-box">
                    <ul class="other-login-ways">
                        <li class="login-way login-qq"><a href="/Passport/QQ/Login"><i class="icon icon-QQ"></i><span>QQ</span></a></li>
                        <li class="login-way login-ali"><a href="/Passport/Alipay/Login"><i class="icon icon-zhifubao"></i><span>支付宝</span></a></li>
                        <li class="extra-r"><a href="../html/Signin.html">登录账号<i class="icon icon-arrow-right-active"></i></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>
<!--注册成功调用的页面-->
<div id="pop-success" style="display:none">
    <i class="icon icon-success"></i>
    <p class="pop-title">注册成功</p>
    <div class="pop-content">
        <p>账号<span id="pop-success-username"></span>已注册成功。</p>
        <p>欢迎加入花礼网~</p>
    </div>
    <div class="pop-btm">
        <a class="pop-btn" href="/">继续浏览</a>
        <p class="pop-tip"><span id="pop-success-countdown"></span>s后将自动跳转…</p>
    </div>
</div>
<!--账号已存在的弹窗页面  background: #898989;position:absolute;top: 279px;left: 603px;-->
<div id="pop-exist" style="display:none; ">
    <p class="pop-title">账号已存在</p>
    <div class="pop-content">
        <p style="color: black;" ><span id="pop-exist-username"></span>已被注册过,请重新检查账号或直接登录。</p>
    </div>
    <a class="pop-btn" href="../html/Signin.html">去登录</a>
</div>
<!-- 尾部导航 -->
<div class="footer-nav">
    <a href="/">首页</a> <b>|</b> <a href="/profile/about.htm" target="_blank">关于我们</a> <b>|</b> <a href="/profile/media.html" target="_blank">媒体报道</a> <b>|</b> <a href="/profile/contact.htm" target="_blank">联系方式</a> <b>|</b> <a href="/qiyetuangou/" target="_blank">企业团购</a> <b>|</b><a href="/liansuo/" target="_blank">花店入驻</a><b>|</b>  <a href="/profile/links.htm" target="_blank">友情链接</a> <b>|</b> <a href="/member/payment/balancefill" target="_blank">在线补款</a> <b>|</b> <a class="last-child" href="/profile/why_choose_us.htm" target="_blank">为什么选择中国鲜花礼品网</a>
</div>
<!-- 尾部导航 End -->
<!-- 通用尾部 -->
<footer>
    <div class="auth">
        <!-- <span style="margin-right:8px;">
            <script src="http://kxlogo.knet.cn/seallogo.dll?sn=e15041744030058395oqbo000000&amp;size=4"></script>
        </span> -->



        <img src="../images/slogan.png" height="50" width="212" />                <a href="/profile/about.htm" target="_blank"><img src="../images/100.jpg" height="49" width="150"></a>
        <a href="/profile/ICP.htm" rel="nofollow" target="_blank"><img src="../images/bico1.jpg" alt="ICP" height="46" width="35"></a>
         <!--未连网-->
        <a href="https://szcert.ebs.org.cn/55f867a5-2c2e-4bc0-823b-5f4647c23d86"><img src="../images/govIcon.gif" style="width: 40px;height: 40px"></a>
        <!--             <a href="http://www.sznet110.gov.cn/webrecord/innernet/Welcome.jsp?bano=4403301920636" rel="nofollow" target="_blank"><img alt="网警" src="//img02.hua.com/pc/assets/img/bico2.jpg" height="46" width="35"></a> -->

       <!--连网-->
<!--
        <script id="ebsgovicon" src="https://szcert.ebs.org.cn/govicons.js?id=fab6de6a-ff80-4e63-89e4-cd531170c256&width=35&height=49&type=1" type="text/javascript" charset="utf-8"></script>
-->
    </div>
    <p><a href="/profile/ChinaFlowerAssociation.htm" rel="nofollow" target="_blank" title="中国花卉协会会员">中国花卉协会会员</a> <a href="/profile/chinaECA.htm" rel="nofollow" target="_blank">中国电子商务协会会员</a> ICP经营许可证：<a>粤B2-20050744</a> <b>|</b> <a href="http://beian.miit.gov.cn" rel="nofollow" target="_blank">粤ICP备09171662号</a> <span class="ico beian"></span>粤公网安备44030502000373号 Copyright © 2005-2020</p>
    <p> <a href="/">www.hua.com</a><span> 深圳市百易信息技术有限公司</span> </p>
</footer>
<!-- 通用尾部 End -->
<!-- 弹出窗口-->
<!-- 弹出窗口end-->
<script type="text/javascript">
    function IEVersion() {
        try {
            var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
            var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //判断是否IE<11浏览器
            var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //判断是否IE的Edge浏览器
            var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1;
            if (isIE) {
                var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
                reIE.test(userAgent);
                var fIEVersion = parseFloat(RegExp["$1"]);
                if (fIEVersion == 7) {
                    return 7;
                } else if (fIEVersion == 8) {
                    return 8;
                } else if (fIEVersion == 9) {
                    return 9;
                } else if (fIEVersion == 10) {
                    return 10;
                } else {
                    return 6;//IE版本<=7
                }
            } else if (isEdge) {
                return 'edge';//edge
            } else if (isIE11) {
                return 11; //IE11
            } else {
                return -1;//不是ie浏览器
            }
        }
        catch (e) {
            return -1;
        }
    }
    var bVersion = IEVersion();
</script>
<script type="text/javascript" charset="UTF-8">

    /*function analytics(pageName1, actionType) {
        try {
            if (!actionType) {
                actionType = "click";
            }
            $.ajax({
                url: "/huactrler/AnalyticsV1",
                type: "post",
                data: {
                    pageName: pageName1,
                    actionType: actionType
                }
            });
        } catch (e) {

        }
        return true;
    };*/

    $(function () {
        //增加绑定 事件
        $(".reg").on('click',phoneRegister);
        // 表单切换
        var Tabs = $('.login-tabs li');  // Tab
        var phoneTab = $(".register-byphone");
        var mailTab = $(".register-bymail");
        var phoneForm = $("#register-phone");
        var mailForm = $("#register-mail");
        phoneTab.click(function () {
            Tabs.removeClass("active");
            $(this).addClass("active");
            phoneForm.show();
            mailForm.hide();
            closeAllImgValidCode();
        })
        mailTab.click(function () {
            Tabs.removeClass("active");
            $(this).addClass("active");
            mailForm.show();
            phoneForm.hide();
            closeAllImgValidCode();
        })
    });

    //回车键
    document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if (e && e.keyCode == 13) {
            // 手机注册
            var isPhonePwdFocus = $("#phonePassWord").is(":focus");
            // 邮箱注册
            var isEmailFocus = $("#email").is(":focus");
            var isEmailPwdFocus = $("#emailPassWord").is(":focus");
            // Form:手机注册判断
            if (isPhonePwdFocus) {
                phoneRegister();
            }
            // Form:邮箱注册判断
            if (isEmailFocus) {
                $("#emailPassWord").focus();
            }
            else if (isEmailPwdFocus) {
                emailRegister();
            }
        }
    };

    var counter = 0;
    var interval = null;

    // 短信验证码倒计时
    function intervalFunc() {
        if (counter > 90) {
            counter = 0;
            $("#regetcode").html("");
            $("#getcode").show();
            $("#prompt_info").hide();
            window.clearInterval(interval);
        } else {
            $("#regetcode").html((90 - counter).toString());
        }
        counter = counter + 1;
    }

    // 弹窗：账号已存在
    function existPop() {
        layer.open({
            type: 1,
            closeBtn: 1, //显示关闭按钮
            anim: 2,
            shadeClose: true, //开启遮罩关闭
            title: '验证',
            content: $('#pop-exist'),
            area: '300px',
            offset: '262px',
            btnAlign: 'c',
            shade: [0.5, '#B4BABF'],
            resize: false,
            move: false
        });
    }
    // 弹窗：注册成功
    function successPop() {
        layer.open({
            type: 1,
            closeBtn: 1, //显示关闭按钮
            anim: 2,
            shade: true, //开启遮罩关闭
            title: '注册',
            content: $('#pop-success'),
            area: '268px',
            offset: '200px',
            btnAlign: 'c',
            shade: [0.5, '#B4BABF'],
            resize: false,
            move: false
        });
    }
    var geetestLock = false;
    var showImgValidCode1 = false;
    // 手机注册：获取短信验证码
   $("#getcode").click(function () {
        var interval = null;
        HideTips();
        if (!Check_Phone("phone", ".tel-box")) return false;
        var phone = $("#phone").val().trim();
       /* IsExistAccount(phone, function (b) {
             if (b) {
                 $("#pop-exist-username").html("手机号" + phone);
                 existPop();  //账号已存在弹窗
             } else {
                 var imgCode = Check_Code("phonePicCode", ".verify-box1");
                 var data = {
                     mobile: phone,
                     //imgCode: imgCode
                 };
                 if (!showImgValidCode1 && (imgCode == undefined || imgCode == "")) {
                     verifyMethodSwitch(data,sendSms,'phoneVerifyBox');
                 }
                 else {
                     sendSms(data)
                 }
             }
         });*/
       var data = {
           phone: phone,
       };
       sendSms(data);

    })
    // 短信验证码发送
    /*function sendSms(data) {
        $.ajax({
            type: "Get",
            url: "http://127.0.0.1:7777/hy-frontuser-consumer/ums_member/send.action",
            data: data,
            dataType: "json",
            async: false,
            success: function (res) {
                var class1 = ".code-box";
                if (res.code == 100 ) {
                    ShowTips("<span style='color:mediumvioletred'>验证码已发送请查收</span>", ".code-box");
                    counter = 0;
                    $("#getcode").hide();
                    $("#regetcode").html("90");
                    $("#prompt_info").show();
                    $("#phoneCode").focus();
                    interval = window.setInterval(intervalFunc, 1000);
                }
                else if(res.code==102){
                    ShowTips("<span style='color:mediumvioletred'>发送失败</span>",".code-box");
                   /!* if (res.DataStatus == 1026) {      // 需要图片验证码
                        $("#phoneVerifyBox").show();
                        $("#phonePicCode").focus();
                        class1 = ".verify-box1";
                    }
                    else if (res.DataStatus == 1002) {     // 手机号格式不正确
                        $("#phone").focus();
                        class1 = ".phone-box";
                    }
                    else if (res.DataStatus == 1012) {     // 图片验证码不正确
                        $("#phoneVerifyBox").show();
                        RefreshImage2('imgCaptcha1','phone');
                        $("#phonePicCode").focus();
                        class1 = ".verify-box1";
                    }
                    else if (res.DataStatus == 1003) {     // 短信验证码发送过于频繁
                        class1 = ".code-box";
                    }
                    if (res.DataStatus != 0) {
                        ShowTips(res.ErrMsg || data.Message, class1);
                    }*!/
                }else{
                    class1 = ".code-box";
                    ShowTips("<span style='color:mediumvioletred'>验证码未失效</span>",".code-box");
                }
            }
        });
    }*/

    // ********** 手机注册逻辑begin **********
    /*function phoneRegister() {
        var successInterval = null;
        HideTips();
        // 必须：手机、短信验证码、密码
        if (!Check_Phone("phone", ".tel-box")) return false;   // 手机
        if (!Check_SmsCode("phoneCode", ".code-box")) return false;  // 短信验证码
        if (!Check_Password("phonePassWord", ".pwd-box1")) return false;   // 密码
        var phone = $("#phone").val().trim();
        var code = $("#phoneCode").val().trim();
        var pwd = $("#phonePassWord").val().trim();
        //var imgCode = Check_Code("phonePicCode", ".verify-box1");     // 图形验证码，非必填
        //获取登录地址
        $.ajax({
            type: "get",
            url: "https://restapi.amap.com/v3/ip?parameters&key=dde806404afaf4ca0ce23f829d6946a5&output=JSON",
            dataType: "json",
            success: function (res) {
                //省份
                var province = res.province;
                //城市
                var city = res.city;
                if(res.status == 1){  //登录地址获取成功
                //password: pwd, //密码没有加
                    $.ajax({
                        type: "Post",
                        url: "http://127.0.0.1:7777/hy-frontuser-consumer/ums_member/userphonezhuce.action",
                        data: {
                            phone: phone,
                            message:code,
                            province:province,
                            city:city
                        },
                        dataType: "json",
                        async: false,
                        success: function (res) {
                            //var data = res.Datas;
                            if (res.code==100) {   // 注册成功
                                // alert("注册成功");
                                successPop();
                                $("#pop-success-username").html(phone);
                                // 3秒自动跳转首页
                                var counter = 3;
                                var popCountdown = $("#pop-success-countdown");
                                popCountdown.html(counter);
                                //setInterval设置时间
                                successInterval = window.setInterval(function () {
                                    if (counter > 0) {
                                        counter--;
                                        popCountdown.html(counter);
                                    }
                                    else {
                                        //取消由setInterval设置的时间
                                        window.clearInterval(successInterval);
                                        location.href = res.redirectUrl;
                                    }
                                }, 1000);
                            }else if(res.code==104){
                                ShowTips(res.message, ".code-box");
                            }else if(res.code==106){
                                existPop();
                            }
                            /!*
                            else if (res.DataStatus == 1511) {      // 手机号已存在
                                 $("#pop-exist-username").html("手机号" + phone);
                                 existPop();
                             }
                             else if (res.DataStatus == 1002) {     // 无效的手机号
                                 ShowTips("手机号格式不正确，请检查后重新输入", ".tel-box");
                                 $("#phone").focus();
                             }
                             else if (res.DataStatus == 1005) {     // 短信验证码不正确
                                 ShowTips("短信验证码有误", ".code-box");
                                 $("#phoneCode").focus();
                             }
                             else if (dres.DataStatus == 1005) {     // 密码不能少于6位
                                 ShowTips("密码不能少于6位", ".pwd-box1");
                                 $("#phonePassWord").focus();
                             }*!/
                        }
                    });
                }
            }
        });
    }*/
    // ********** 手机注册逻辑end **********

    // ********** 邮箱注册逻辑begin **********
    function emailRegister() {
        try {
            analytics("EmailRegButtonClick");
        } catch (e) {
        }
        var successInterval = null;
        HideTips();
        // 必须：邮箱、密码、(图片验证码)
        if (!Check_Email("email", ".mail-box")) return false;   // 邮箱
        var email = $("#email").val().trim();
        if (!Check_Password("emailPassWord", ".pwd-box2")) return false;   // 密码

        var imgCode = Check_Code("emailValidCode", ".verify-box2");     // Check_Code方法返回图形验证码用户输入的value值

        IsExistAccount(email, function (b) {
            if (b) {
                $("#pop-exist-username").html("邮箱" + email);
                existPop();
            } else {
                var data = {
                    mobile: email,
                    imgCode: imgCode
                };
                if (!showImgValidCode1 && (imgCode == undefined || imgCode == "")) {
                    verifyMethodSwitch(data, emailRegister1, 'emailVerifyBox');
                }
                else {
                    emailRegister1()
                }
            }
        });
    }
    function emailRegister1() {
        var successInterval = null;

        var email = $("#email").val().trim();
        var pwd = $("#emailPassWord").val().trim();
        var validCode = Check_Code("emailValidCode", ".verify-box2");

        $.ajax({
            type: "Post",
            url: "/Passport/Register/EmailRegisterV2",
            data: {
                email: email,
                password: pwd,
                picValidCode: validCode
            },
            dataType: "json",
            async: false,
            success: function (data) {
                if (data.Status == "0") {
                    if (data.DataStatus == 0) {
                        try {
                            analytics("EmailRegButtonResponse","response");
                        } catch (e) {
                        }

                        $("#pop-success-username").html(email);
                        successPop();
                        // 3秒自动跳转首页
                        var counter = 3;
                        var popCountdown = $("#pop-success-countdown");
                        popCountdown.html(counter);
                        successInterval = window.setInterval(function () {
                            if (counter > 0) {
                                counter--;
                                popCountdown.html(counter);
                            }
                            else {
                                window.clearInterval(successInterval);
                                window.location.href = data.Datas.ReturnUrl;
                            }
                        }, 1000);
                    }
                    else {
                        ShowTips(data.Datas.Message, ".pwd-box2");
                    }
                }
                else {
                    ShowTips(data.ErrMsg, ".pwd-box2");
                }
                if (data.DataStatus == 1026) {
                    $("#emailVerifyBox").show();
                }
            }
        });
    }
    // ********** 邮箱注册逻辑end **********

</script>


<script type="text/javascript">
    var userId = 0;
    function reqUrlParam(paras) {
        var url = location.href;
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        var paraObj = {}
        for (i = 0; j = paraString[i]; i++) {
            paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
        }
        var returnValue = paraObj[paras.toLowerCase()];
        if (typeof (returnValue) == "undefined") {
            return "";
        } else {
            return returnValue;
        }
    }
    function setLocalStoreHua(k, v) {
        try {
            if (localStorage != null) {
                localStorage.setItem(k, v);
            }
        } catch (ex) { }
    }
    function getLocalStoreHua(k) {
        try {
            if (localStorage != null) {
                var v1 = localStorage.getItem(k);
                localStorage.removeItem(k);
                return v1;
            }
        } catch (ex) { }
        return "";
    }
    var lsPerfKey = "home/GetProductListPrice";
    function getProductPrice() {
        var dataPps = "";
        $("span[data-pp]").each(function (index, data) {
            dataPps = dataPps + $(this).attr("data-pp") + ",";
        })
        if (dataPps.length > 0) {
            var perf1 = getLocalStoreHua(lsPerfKey);
            var dts = new Date();
            $.ajax({
                type: "POST", url: "/home/GetProductListPrice",
                data: { itemcodes: dataPps, perf: perf1 },
                timeout: 60000, dataType: 'json',
                success: function (res) {
                    if (res.DataStatus == 200 && res.Status == '0') {
                        if (res.Datas.ProductPrices.length == 0) {
                            return false;
                        }
                        for (var i = 0, len = res.Datas.ProductPrices.length; i < len; i++) {
                            var temp = res.Datas.ProductPrices[i];
                            $("span[data-pp='" + temp.ItemCode + "']").text(temp.Price);
                        }
                    }
                    else { }
                },
                complete: function (res) {
                    var dte = new Date();
                    var useMs = dte.getTime() - dts.getTime();
                    //var resTxt = "v0,"+res.readyState + "," + res.status + "," + res.statusText;
                    var resTxt = "v0," + res.status + "," + dts.getTime() + "," + useMs;
                    setLocalStoreHua(lsPerfKey, resTxt);
                    //console.log("AjaxReq性能", resTxt);
                }
            });
        }
    }
    function setCurUrlClass() {
        // css : class = "color_tj"
        var pathname1 = window.location.pathname;
        $("a[href='" + pathname1 + "'").addClass("color_tj");
    }
    getProductPrice();

    function addHuaPid() {
        try {
            var path = encodeURIComponent(window.location.pathname);
            $("a[data-link]").each(function (index, data) {
                if ($(this).attr("href").indexOf("huaPid=") == -1) {
                    var href = $(this).attr("href") + "?huaPid=" + path + "-" + $(this).attr("data-link");
                    $(this).attr("href", href);
                }
            })
        }
        catch (e) {
            console.log(e);
        }
    }
    addHuaPid();

    /*$(function () {
        $(".menu-dropdown").hover(function () {
            $(this).addClass("open");
        }, function () {
            $(this).removeClass("open")
        })
        $.get("/Home/GetLoginUserId", null, function (data) {
            userId = data;
        }, "json");

        $("#header-chat,#kefu,#kefu1").click(function (e) {
            e.preventDefault();
            //$("#MEIQIA-BTN").click();
            //_MEIQIA('showPanel');
            openChatWindow();
        });

        if ($("#pjCount").length > 0) {
            $.get("/productpj/GetPJCount", function (data) {
                $("#pjCount").text(data);
            });
        }
    });*/
</script>
<!--Hua.com统计-->
<script type="text/javascript">
    function getParameters(paramName) {
        var returnValue = "";
        var kv = location.search.slice(1).split("&");
        for (var i = 0; i < kv.length; i++) {
            var index = kv[i].indexOf("=");
            if (index == -1) {
                continue;
            }
            var groupParam = kv[i].split("=")
            if (groupParam[0] == paramName) {
                if (returnValue.length > 0) {
                    returnValue = returnValue + "|" + groupParam[1];
                } else {
                    returnValue = groupParam[1];
                }
            }
        }
        return returnValue;
    }
    (function () {
        var locationUrl = location.href;
        var refererUrl = document.referrer;
        if (locationUrl.length > 300) {
            locationUrl = locationUrl.substring(0, 300);
        }
        if (refererUrl.length > 200) {
            refererUrl = refererUrl.substring(0, 200);
        }
        /*var apiurl = "/huactrler/hm?lt=" + (+new Date()) + "&sid=" + getParameters('sid') + "&u_id=" + getParameters('u_id') + "&huaPid=" + getParameters('huaPid');
        apiurl = apiurl + "&url=" + encodeURIComponent(locationUrl) + "&urlreferer=" + encodeURIComponent(refererUrl);
        var img = new Image;
        img.onload = img.onerror = img.onabort = function () { }
        img.src = apiurl;*/
    })();
</script>
<!--百度统计-->
<script type="text/javascript">
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?ae896b60487020696d3df0e260c080bf";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<!-- Google Tag Manager -->
<script type="text/javascript">
    try {
        if (bVersion != 8) {
            (function (w, d, s, l, i) {
                w[l] = w[l] || []; w[l].push({
                    'gtm.start':
                        new Date().getTime(), event: 'gtm.js'
                }); var f = d.getElementsByTagName(s)[0],
                    j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
                    'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
            })(window, document, 'script', 'dataLayer', 'GTM-KS4PTHC');
        }
    }
    catch (e) { }
</script>
<!-- End Google Tag Manager -->
<script type='text/javascript'>
    /*try {
        if (bVersion != 8 && bVersion != 9) {
            (function (m, ei, q, i, a, j, s) {
                m[i] = m[i] || function () {
                    (m[i].a = m[i].a || []).push(arguments)
                };
                j = ei.createElement(q),
                    s = ei.getElementsByTagName(q)[0];
                j.async = true;
                j.charset = 'UTF-8';
                j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t';
                s.parentNode.insertBefore(j, s);
            })(window, document, 'script', '_MEIQIA');
            _MEIQIA('entId', 111117);//1212
            $.post("/Home/MeiQiaVisitLog", null, function (data) {
                _MEIQIA('clientId', data);
            });
        }
    }
    catch (e) { }*/

    function LayerOpen(title, url, wdith, height) {
        layer.open({
            type: 2,
            title: title,
            shadeClose: true,
            shade: 0,
            offset: 'rb', //右下角弹出
            area: [wdith + 'px', height + 'px'],
            content: url //iframe的url
        });
    }

    function openChatWindow() {
        if (bVersion == 9) {
            LayerOpen("在线客服", "https://temp-chat.mstatik.com/widget/standalone.html?eid=111117", 500, 600);
        }
        else if (bVersion == 8) {
            LayerOpen("在线客服", "/home/weixinkefu", 240, 300);
        }
        else {
            _MEIQIA('showPanel');
        }
    }
</script>
<script type="text/javascript">

    $('#bindModal').on('hidden.bs.modal', function () {
        $("#attBindPage").attr("src", "");
    });
    //绑定窗口操作结束
    var appAuthorizedType = -1;
    if (appAuthorizedType && appAuthorizedType>0) {
        DoBind();
    }
    function DoBind() {
        try {
            $('#consigneeModal').modal('hide');
            $('#loginModal').modal('hide');
            $('#bindModal').modal('show');
            $("#attBindPage").attr('src', '/Passport/Login/WinLoginBind?appAuthorizedType=' + appAuthorizedType)
        }
        catch (err) {
        }
    }

</script>
</body>
</html>